home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -serious- / graphics / gnuplot / gnuplot-3.7.1src / gnuplot-3.7.1 / makefile.djg < prev    next >
Makefile  |  1999-11-29  |  4KB  |  121 lines

  1. # make file ‘W¤ÍŸîpile it by   make -f makefile.djg
  2.  
  3. # where to place gnuplot.gih helpfile
  4. HELPFILE = gnuplot.gih
  5.  
  6. # exe file will be  gp36.exe:
  7. EXENAME = gp36
  8.  
  9. # compiler
  10. CCDIR = c:\djgpp\bin\
  11. CC = $(CCDIR)gcc
  12. # include directory
  13. INCLUDE = -I.
  14. #INCLUDE = -I. -Ic:/djgpp/include
  15.  
  16. # djgpp vsn 1.* does not define time_t
  17. #HBB: that's what NEED_TIME_T is meant to do...
  18. #HBB: added $(OPTS) so the user can easily extend CFLAGS
  19. CFLAGS = -DNEED_TIME_T -DMSDOS -DDOS32 -DDJGPP -DANSI_C -DREADLINE -DHAVE_STRNICMP -D_NAIVE_DOS_REGS -DPIPES $(OPTS)
  20. TERMFLAGS = -DDJSVGA -DGRX20 -Ic:/gpp/v1/include/grx20
  21. # The graphics libraries of djgpp are  -lgr -lgrx or -lgrx20.
  22. # Choose one of them:
  23. # HBB: if you choose -lgrx20 for DJGPP V1, add -DGRX20
  24. #    (and perhaps -I....grx20) to TERMFLAGS!
  25. #LINKOPT = -lm -lpc -lgr
  26. #LINKOPT = -lm -lpc -lgrx
  27. LINKOPT = -lm -lpc -lgrx20 $(OPTS)
  28.  
  29. CSOURCE5 = term/ai.trm term/amiga.trm term/aed.trm \
  30.         term/cgi.trm term/djsvga.trm term/dumb.trm \
  31.         term/dxf.trm term/dxy.trm \
  32.         term/debug.trm term/eepic.trm term/epson.trm term/fig.trm  \
  33.         term/hp26.trm term/hp2648.trm term/hpgl.trm  \
  34.         term/hpljii.trm term/metafont.trm\
  35.         term/apollo.trm term/gpr.trm term/hppj.trm term/compact.c 
  36. CSOURCE6 = term/impcodes.h term/imagen.trm term/next.trm term/object.h \
  37.         term/iris4d.trm term/kyo.trm term/latex.trm term/mif.trm \
  38.         term/pbm.trm term/pc.trm 
  39. CSOURCE7 = term/post.trm term/qms.trm term/regis.trm term/sun.trm \
  40.         term/t410x.trm term/tek.trm term/texdraw.trm term/unixpc.trm \
  41.         term/unixplot.trm term/v384.trm term/vws.trm term/x11.trm term/xlib.trm
  42. OBJ1 =  bitmap.o command.o contour.o eval.o graphics.o graph3d.o hidden3d.o util3d.o
  43. OBJ2 =  help.o internal.o misc.o parse.o plot.o plot2d.o plot3d.o readline.o
  44. OBJ3 =  scanner.o set.o show.o specfun.o standard.o term.o time.o util.o
  45. OBJ4 =  version.o binary.o interpol.o fit.o matrix.o datafile.o alloc.o ctrl87.o
  46.  
  47. OBJS =  $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4)
  48.  
  49. .c.o:  
  50.     $(CC) -c $(CFLAGS) $(INCLUDE) $<
  51.  
  52. all: $(EXENAME).exe $(HELPFILE)
  53.  
  54. $(EXENAME).exe : $(OBJS)
  55.     $(CC) -o $(EXENAME) $(OBJS) $(LINKOPT)
  56. #    strip $(EXENAME)
  57. #HBB: keep a debuggable gp36 around
  58.     objcopy --strip-all $(EXENAME) $(EXENAME).str
  59.     coff2exe $(EXENAME).str
  60.     del $(EXENAME).str
  61.     @echo Rem: you need  go32  to run gnuplot
  62.  
  63. # This would copy go32 to the exe file
  64. #$(EXENAME).exe : $(OBJS)
  65. #       $(CC) -o $(EXENAME) $(OBJS) $(LINKOPT)
  66. #       strip $(EXENAME)
  67. #       copy /b $(CCDIR)\$(EXENAME).exe+$(EXENAME) $(EXENAME).exe
  68. #       del $(EXENAME)
  69.  
  70.  
  71. command.o: command.c plot.h setshow.h help.h
  72.     $(CC) -c $(CFLAGS) $(INCLUDE) -DHELPFILE=\"$(HELPFILE)\" command.c
  73.  
  74. show.o: show.c plot.h setshow.h
  75.     $(CC) -c $(CFLAGS) $(INCLUDE) -DHELPFILE=\"$(HELPFILE)\" show.c
  76.  
  77. term.o: term.c term.h plot.h set.c show.c bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
  78.     $(CC) -c $(CFLAGS) $(INCLUDE) $(TERMFLAGS) -Iterm term.c
  79.  
  80. $(OBJS): plot.h
  81.  
  82. command.o help.o misc.o: help.h
  83.  
  84. command.o graphics.o graph3d.o hidden3d.o util3d.o misc.o plot.o set.o show.o term.o interpol.o: setshow.h
  85.  
  86. command.o fit.o matrix.o: fit.h
  87.  
  88. fit.o matrix.o: matrix.h
  89.  
  90. bitmap.o term.o: bitmap.h
  91.  
  92. #HBB: ctrl87.c cannot be optimized, it seems...
  93. ctrl87.o: ctrl87.c ctrl87.h
  94.     gcc -c -g -Wall -O0 -m486 $<
  95.  
  96. # convert gnuplot.doc to gnuplot.gih
  97. $(HELPFILE): doc2gih.exe docs\gnuplot.doc
  98.     doc2gih docs/gnuplot.doc $(HELPFILE)
  99.  
  100. doc2gih.exe: docs\doc2gih.c docs\termdoc.c
  101.     $(CC) $(CFLAGS) $(INCLUDE) $(TERMFLAGS) -Iterm -o doc2gih docs/doc2gih.c docs/termdoc.c
  102.     strip doc2gih
  103.     coff2exe doc2gih
  104. #    copy /b $(CCDIR)\go32.exe+doc2gih doc2gih.exe
  105.  
  106.  
  107. # clean target - remove all temp files, but leave executable intact
  108. # needed when changing configuration (model or overlaying)
  109.  
  110. clean:
  111.     del *.o
  112.     del $(EXENAME)
  113.     del doc2gih
  114.  
  115. # realclean target - remove all files created by the makefile
  116.  
  117. realclean: clean
  118.     del $(EXENAME).exe
  119.     del doc2gih.exe
  120.     del gnuplot.gih
  121.